import requests
import baozou_insert_sql
import json
def weiyueyun():
    r = requests.session()
    url = "https://ag.emeixs.com/login/in.html"
    date ={
        "username": "",
        "password" : "",
    }

    Platform = "微阅云"
    rr = r.post(url=url,data = date)
    # print(rr.text)

    aa = r.get(url="https://ag.emeixs.com/main/daily?list_rows=20&page=1")
    # print(aa.text)
    html = json.loads(aa.text)

    bb =html["rows"]
    # for i in range(0,len(bb)):
    Amount_share =html["rows"][0]["total_money"]
    Amount_share = int(Amount_share)*0.9
    Amount_share = round(Amount_share, 2)
    date_time =html["rows"][0]["sumon"]
    # print(Amount_share,date_time)

    baozou_insert_sql.baozou_spider_everyday_sum(date_time,Amount_share,Platform)

